Fix a tty-related preprocessor inclusion error affecting GNU/Hurd systems.
authorRob Browning <rlb@defaultvalue.org>
Sat, 9 Apr 2011 03:50:51 +0000 (22:50 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sat, 9 Apr 2011 03:50:51 +0000 (22:50 -0500)
A problem with the preprocessor defines in src/term.c has been fixed.
This problem would cause Emacs to fail on GNU/Hurd systems as follows:

  $ emacs -nw
  emacs: Not a tty device: /dev/tty

Author: Samuel Thibault <sthibault@debian.org>
Date: Thu, 20 Jan 2011 02:17:24 +0100
Applied-By: Rob Browning <rlb@defaultvalue.org>
Forwarded: bug-gnu-emacs@gnu.org
Closes: #610576
src/term.c

index 6d16a65674b043a2a3225b38dca87d6d42a6fbe9..44e127e7154d21d4085826e19d347e583ac2a0b5 100644 (file)
@@ -3413,13 +3413,12 @@ init_tty (char *name, char *terminal_type, int must_succeed)
          if we don't have one at the moment.  */
       fd = emacs_open (name, O_RDWR | O_IGNORE_CTTY | O_NOCTTY, 0);
     else
-#else
+#endif /* O_IGNORE_CTTY */
       /* Alas, O_IGNORE_CTTY is a GNU extension that seems to be only
          defined on Hurd.  On other systems, we need to explicitly
          dissociate ourselves from the controlling tty when we want to
          open a frame on the same terminal.  */
       fd = emacs_open (name, O_RDWR | O_NOCTTY, 0);
-#endif /* O_IGNORE_CTTY */
 
     tty->name = xstrdup (name);
     terminal->name = xstrdup (name);